package com.example;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * User: dlernatovich
 * Date: 6/26/12
 * Time: 8:21 PM
 * To change this template use File | Settings | File Templates.
 */
public class ListViewForm extends Activity {

    ListView list;
    private ArrayList<String> listData = new ArrayList<String>();

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.list_form);
        listData.clear();
        for (int i = 0; i < 20; i++) {
            listData.add("Option " + Integer.toString(i));
        }
        list = (ListView) findViewById(R.id.myList);
        list.setAdapter(new OptimyzeArrayAdapter(this, android.R.layout.simple_list_item_1, listData));
    }
}